using System.ComponentModel.Composition;
using System.Windows;

namespace MediaAssistant.Controls.Dialog
{
    [Export(typeof(IDialogView))]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public partial class DialogView : IDialogView
    {
        public DialogView()
        {
            InitializeComponent();
        }

        public void ShowModal()
        {
            if(Application.Current.MainWindow==this)
            {
                ShowInTaskbar = true;
            }
            if (Application.Current.MainWindow!=null && Application.Current.MainWindow.Equals(this) == false)
                Owner = Application.Current.MainWindow;
            ShowDialog();
        }
    }
}
